<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Administration
</asp:Content>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
<ul>
    <li><%= Html.ActionLink("New Post", Admin.Create) %></li>
    <li><%= Html.ActionLink("List Posts", Admin.List) %></li>
    <li><%= Html.ActionLink("Site Configuration", Admin.Configuration) %></li>
</ul>

<h2>Recent Comments</h2>
<div id="recentComments"></div>
</asp:Content>

<asp:Content ContentPlaceHolderID="Script" runat="server">
<script language="javascript" type="text/javascript">
    $(document).ready(function() {
        $.get(
            "<%= Url.Action(Admin.RecentComments, Admin.Controller) %>",
            function(data) {
                $("#recentComments").append(data);
            },
            "html");
    });
</script>
</asp:Content>